/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package object;

import java.util.ArrayList;

/**
 *
 * @author Le Thai
 */
public class DsLop {
    private ArrayList<Lop> dslop=new ArrayList<>();
    
    public DsLop(){
    
    }
    
    public DsLop(ArrayList<Lop> dslop){
        this.dslop=dslop;
    }
    
    public int timMaLop(String tenlop){
        for(Lop l:dslop){
            if(l.getLop().equals(tenlop)) return l.getMaLop();
        }
        return 0;
    }
   
    //getter - setter
    public ArrayList<Lop> getDsLop(){
        return dslop;
    }
    public void setDsLop(ArrayList<Lop> dslop){
        this.dslop=dslop;
    }
}
